<html xmlns:th="http://www.thymeleaf.org">
<input type="hidden" name="clientId" id="clientId" th:value="${clientId}"/>
<table class="editTable">
    <thead>
    <tr>
        <td colspan="8">
            <div class="divider">
                <span> 基本信息</span>
            </div>
        </td>
    </tr>
    <tr>
        <th class="label" width="8%"><span class="span_red">*</span>权限名称</th>
        <td width="42%">
            <input type="text" name="name" data-toggle="topjui-textbox" data-options="required:true,validateOnCreate:false,width:250" value="">
        </td>
        <th class="label" width="8%"><span class="span_red">*</span>权限code</th>
        <td width="42%">
            <input type="text" name="code" data-toggle="topjui-textbox" data-options="required:true,validateOnCreate:false,width:250" value="">
        </td>
    </tr>
    <tr>
        <th class="label" width="8%"><span class="span_red">*</span>菜单图标</th>
        <td width="42%">
            <input type="text" name="icon" data-toggle="topjui-textbox" data-options="required:true,validateOnCreate:false,width:250" value="">
        </td>
        <th class="label">状态</th>
        <td>
            <div data-toggle="topjui-radio">
                <input type="hidden" id="sysMenuStatus" value="">
                <input type="radio" name="status" value="ENABLE" label="启用" checked="checked">
                <input type="radio" name="status" value="DISABLE" label="禁用">
            </div>
        </td>
    </tr>
    <tr>
        <th class="label" width="8%">父权限</th>
        <td width="42%">
            <!--<input type="hidden" name="pid">-->
            <input type="text" name="pid" value="-1" data-toggle="topjui-combotree">
        </td>
    </tr>
    <tr>
        <th>&nbsp;</th>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <th class="label">说明</th>
        <td colspan="3">
            <input type="text" name="description" data-toggle="topjui-textbox" style="width: 94%;" value="">
        </td>
    </tr>
    </thead>
</table>

<script th:inline="javascript">

    //TODO: 获取项目上下文路径，记得需要在<script>标签中加入  th:inline="javascript" 属性配置，才可正常解析
    /*<![CDATA[*/
    var contextPath = /*[[@{/}]]*/;
    /*]]>*/

    /**
     * 动态设置父菜单的url
     */
    $(document).ready(function () {
        var clientId = $("#clientId").val();
        $("input[name='pid']").attr("data-options", "required:true,prompt:'必填',width:250,textField:'name',url:'" + contextPath + "permission/list/not/itself/-1/" + clientId + "'");
    });
</script>

</html>